package cn.com.twoke.easyproject.common.exception;


import cn.com.twoke.easyproject.common.response.BusinessCode;
import cn.com.twoke.easyproject.common.response.ResponseCode;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {

    private Integer code;

    public BusinessException() {
    }

    public BusinessException(BusinessCode businessCode) {
        super(businessCode.message);
        this.code = businessCode.code;
    }

    public BusinessException(String message) {
        super(message);
        this.code = BusinessCode.ERROR.code;
    }

}
